<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			p{
				text-align: center;
			}
			span{
				color: aqua;
			}
		</style>
	</head>
	<body>
		<p>
			<span id="time">5</span>秒后跳转到轮播图！
		</p>
		<script>
			
			var t=5;
			
			var time=document.getElementById("time");
			function showtime(){
				t--;
				if(t==0){
					location.href="http://127.0.0.1:8848/javascript/7%E8%BD%AE%E6%92%AD%E5%9B%BE.html";
				}
				//innerHTML可以修改标题标签
				time.innerHTML=t;
				
			}
			setInterval(showtime,1000);
			
		</script>
	</body>
</html>